import java.util.Arrays;
import java.util.Scanner;
public class NumberMain {
        public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            String s = "";
            System.out.println("请输入数字：");
            Double num = scan.nextDouble();
            String d = String.valueOf(num);
            String[] arr = d.split("\\.");
            String[] arr1 = arr[0].split("");
            int number = 0;
            for (int i = arr1.length - 1; i >= 0; i--) {
                number++;
                if (number % 3 == 0) {
                    arr1[i] = "," + arr1[i];
                }
            }
            for (String item : arr1) {
                s += item;
            }
            System.out.println(s + "." + arr[1]);
        }

    }
